<?php
/**
 * prevnext.phtml
 * 
 * creates a list of previous/next posts for a given post
 * 
 * @category    Madoqua
 * @package     Module
 * @subpackage  Blog
 */
?>

<div class="previous-posts">
    <?php if(count($this->previous) > 0) : ?>
    <ul>
        <?php foreach($this->previous as $post) : ?>
        <li>
            <a href="<?php echo $this->url(array('slug' => $post->slug), 'post_read', true); ?>">
                <?php echo $post->title; ?>
            </a>
        </li>
        <?php endforeach; ?>
    </ul>
    <?php endif; ?>
</div>

<div class="next-posts">
    <?php if(count($this->next) > 0) : ?>
    <ul>
        <?php foreach($this->next as $post) : ?>
        <li>
            <a href="<?php echo $this->url(array('slug' => $post->slug), 'post_read', true); ?>">
                <?php echo $post->title; ?>
            </a>
        </li>
        <?php endforeach; ?>
    </ul>
    <?php endif; ?>
</div>